﻿using System;
using LinFu.IoC.Configuration;
using LinFu.IoC.Interfaces;
using CoreEx.Common.Validation;

namespace CoreEx.Common.Implementation.Validation
{    
    ///// <summary>
    ///// Factory class to create <see cref="IPropertyValidator{T}"/> instances.
    ///// </summary>     
    //[Factory(typeof(IPropertyValidator<>))]    
    //public class PropertyValidatorFactory : IFactory
    //{
    //    /// <summary>
    //    /// Creates a new <see cref="IPropertyValidator{T}"/> instance.
    //    /// </summary>
    //    /// <param name="request">Contains information about the service request.</param>
    //    /// <returns><see cref="IPropertyValidator{T}"/></returns>
    //    public object CreateInstance(IFactoryRequest request)
    //    {
    //        var validatorType = typeof(PropertyValidator<>).MakeGenericType(request.ServiceType.GetGenericArguments());
    //        return Activator.CreateInstance(validatorType);
    //    }
    //}
}
